package com.ghovos.usermangerpgdemo.common.component;

import com.ghovos.usermangerpgdemo.service.PermissionService;
import lombok.AllArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

/**
 * @author liulingfeng6
 */
@Component
@AllArgsConstructor
public class InitPermissionUrl implements ApplicationRunner {

    private final PermissionService permissionService;

    @Override
    public void run(ApplicationArguments args) throws Exception {
        permissionService.initRedisUrlRole();
    }
}
